/* -------------- general css - for all pages -------------- */

/* imports */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fugaz+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bungee&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Barcode+39+Text&display=swap');

/*
FONTS NAMES AND STYLES

--------
font1:
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
    color: white;
font2:
    font-family: "Anton", sans-serif;
    font-weight: 400;
    font-style: normal;
font3:
    font-family: "Bebas Neue", sans-serif;
    font-weight: 400;
    font-style: normal;
font4:
    font-family: "Fugaz One", sans-serif;
    font-weight: 400;
    font-style: normal;
font5: 
    font-family: "Bungee", sans-serif;
    font-weight: 400;
    font-style: normal;
font6: 
    font-family: "Libre Barcode 39 Text", system-ui;
    font-weight: 400;
    font-style: normal;
--------
*/



/* general css file for set elements -- HTML elements*/
html{
    scroll-behavior:smooth;
}

*{  
    font-family: "Plus Jakarta Sans", Arial;
    color: white;
}

body{
    background-color: rgb(55, 55, 55);
    display: flex;
    flex-direction: column;
}

.title{
    all: unset;
    font-size: 8em !important;
    text-shadow: 0px 0px 10px black ;
    font-weight: bold;
    padding: 0em !important;
}

h1{
    font-family: "Bebas Neue", sans-serif !important;
    font-weight: 400;
    font-style: normal;
    font-size: 5em !important;

    padding-left: 4rem !important;
    padding-right: 4rem !important;
    padding: 0.5em;
    margin: 0em;

    text-shadow: 0px 0px 5px black ;
    background-color: rgba(255, 255, 255, 0.2);
    border-bottom: 10px solid black;
    border-top: 1px solid black;
}

h2{
    font-family: "Bebas Neue", sans-serif !important;
    font-weight: 400;
    font-style: normal;

    padding-left: 4rem !important;
    padding-right: 4rem !important;
    padding: 0.5em;
    margin: 0em;
    margin-top: 1em;
    margin-bottom: 1em;
    
    font-size: 3.5em;

    text-shadow: 0px 0px 5px black ;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);

}

h3{
    font-family: "Plus Jakarta Sans", Arial !important;
    text-shadow: 0px 1px 4px black ;
    font-size: 1.25rem;
    font-style: strong;
    padding: 1em;
    margin:1.5em;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
}

button{
    all:unset;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 1em;
    box-shadow: 0 0 5px black;
    color: white;
    transition: all 0.2s ease-in-out;

}

button:hover{
    background-color: white;
    border-radius: 50px;
    color: black;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 10px white;
}

/* same as above but for a tags */
.abutton{
    all:unset;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 1em;
    box-shadow: 0 0 5px black;
    color: white;
    transition: all 0.2s ease-in-out;

}

.abutton:hover{
    background-color: white;
    border-radius: 50px;
    color: black;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 10px white;
}

/* specific classes */
.logo{
    width: 3em;
    height: 3em;
    border-radius: 50%;   
}

menu-toggle{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.1em !important;

    background: transparent !important;
    border: none !important;

    transition: all 0.2s ease-in-out !important;

}

#menu-toggle, button{
    all:unset;
    background-color: rgba(0, 0, 0, 0);
    border-radius: 50%;
    padding: 1em;
    box-shadow: 0 0 0px black;
    color: white;
    transition: all 0.2s ease-in-out;

}

#menu-toggle:hover{
    background-color: rgb(0, 0, 0) !important;
    border-radius: 50% !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.mobileNavBar{
    display:none;
}

.desktopNavBar{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5em 2em 1em 2em;
    background: linear-gradient(rgba(0, 0, 0, 0.49), rgba(0, 0, 0, 0.418));    background-size: 20em;
    color: white;
    a{
        color: white;
    }
    
}

.desktopNavBar ul{
    list-style-type: none;
    display: flex;
    flex-direction: row;
}

.desktopNavBar ul li{
    padding: 0.5em;

    a{
        border-radius: 0px !important;
    }
}

.barcodetext{
    font-family: "Libre Barcode 39 Text", system-ui;
    font-weight: 400;
    font-style: normal;
    font-size: 2em;
    padding: 1em;
}

.blacktext{
    color: black;
}

.textbox{
    padding:1em;
    margin: 2em;
    background-color: rgba(255,255,255,0.05);
    border-radius: 10px;
}

/* nav bar */
nav{ 
    padding: 0.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: black;
    background-color: rgba(0, 0, 0, 0.5);
}

nav a{
    transition: all 0.3s ease-in-out;
    padding: 1em;
    margin: 0em 0.5em 0em;
    font-size: 0.75rem;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-radius: 25px;
}

nav a img{
    width: 25px;
    height: 25px;
    vertical-align: middle;
    transform: scale(1);
    transition: all 0.2s ease-in-out;
}

nav a:hover{
    transition: all 0.3s ease-in-out;
    font-weight: strong;
    background-color: rgba(255, 255, 255, 0.2);
    img{
        transform: scale(1.5);
    }
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5);
    
}

/* scroll to top button */

.topbutton {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.topbutton img {
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}

.topbutton img:hover {
    transform: scale(1.2);
}




/* footer elems*/


footer{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1em;
    border:1px;
    /*border-top: solid rgb(255, 255, 255);*/
    background-color: rgba(0, 0, 0,0.5);
}

footer a{
    margin: 1em;
    padding: 0.75em;

    font-style: italic;
    text-decoration: none;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
    border-radius: 25px;
}


footer a:hover{
    font-weight: strong;
    background-color: rgb(90, 30, 30);
    img{
        transform: scale(1.5);
        transition: transform 0.2s ease-in-out;
    }
}

.footerlinks{
    display:flex;
    justify-content: center;
}


@media screen and (max-width: 767px) {
    .desktopNavBar{
        display: none;
    }
    .mobileNavBar{
        transition: all 0.3s ease-in-out;
        display: block;
        flex-direction: column;
        padding: 0.5em 2em !important;
        align-items: center;
        background: linear-gradient(rgb(167, 0, 0), rgb(0, 0, 0));    background-size: 20em;        color: white;
        a{
            padding: 0em;
            color: white;
        }

    }

    .mobileNavBar ul{
        list-style-type: none;
        flex-direction: column;
        align-items: center;
        padding: 0em;
        width: 100%;
    }


    .mobileNavBar ul li{
        padding: 0.5em;

        a{
            border-radius: 0px !important;
        }
    }

    .mobileNavBar .nav-header{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-links{
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active{
        max-height: 25em;
    }

    .title{
        text-align: center;
        all: unset;
        font-size: 5em;
        text-shadow: 0px 0px 10px black ;
        font-weight: bold;
    }
    
    h1{
        font-family: "Bebas Neue", sans-serif !important;
        font-weight: 400;
        font-style: normal;
        font-size: 4rem !important;
    
        padding: 1em;
    
        text-shadow: 0px 0px 5px black ;
        background-color: rgba(255, 255, 255, 0.2);
        border-bottom: 10px solid black;
        border-top: 1px solid black;
    }
    
    h2{
        padding: 1em;
        margin: 0em;
        
        font-size: 4em;
        text-align: center;
        text-shadow: 0px 0px 5px black ;
        background-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
    
    }
    
    h3{
        font-family: "Plus Jakarta Sans", Arial !important;
        text-shadow: 0px 0px 10px black ;
        font-size: 1.25rem;
        font-style: strong;
        padding: 1em;
        margin:1.5em;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 25px;
    }
}

/* -------------- image viewer -------------- */
/* the big picture that opens when any picture on the page is clicked */
/* it is built by javascript/imageViewer.js */
/* pinned to the four corners of the screen instead of being sized by a
   percentage - a dialog comes with its own width, margin and max width,
   and those are what make it hang off the side */
#imageViewer{
    position: fixed;
    inset: 0;
    margin: 0;

    width: auto;
    height: auto;
    max-width: none;
    max-height: none;

    padding: 0;
    border: none;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0);

    animation: viewerFade 0.2s ease-in-out;
}

#imageViewer::backdrop{
    background-color: rgba(0, 0, 0, 0.5);
}

@keyframes viewerFade{
    from{
        opacity: 0;
        transform: scale(0.97);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}

/* everything in here counts its padding inside its own size, so nothing
   can ever end up wider or taller than the screen */
#imageViewer *, #imageViewer{
    box-sizing: border-box;
}

.viewerInner{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;

    width: 100%;
    height: 100%;

    /* the padding is what keeps the picture off the edges and out from
       under the x in the corner - the picture only gets what is left */
    padding: 5em 4em;
}

/* the frame takes whatever room is left over, so the close button and the
   x always stay on screen. when the picture is zoomed in you scroll it
   around inside here */
.viewerFrame{
    display: flex;

    flex: 1;
    min-height: 0;
    width: 100%;

    /* nothing scrolls until the picture is actually zoomed in, so a
       rounded off half a pixel cannot put a scroll bar on the page */
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.viewerFrame.zoomed{
    overflow: auto;
    /* a finger can drag the picture around and pinch to zoom in further */
    touch-action: pan-x pan-y pinch-zoom;
}

#viewerImage{
    /* auto margins centre it without cutting off the top when it is zoomed */
    margin: auto;

    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;

    border-radius: 15px;
    box-shadow: 0 0 30px black;
    cursor: zoom-in;
    transition: none;
}

/* one tap or click makes it big - then it can be dragged around */
#viewerImage.zoomed{
    max-width: none;
    max-height: none;
    width: 200%;
    flex-shrink: 0;
    cursor: zoom-out;
}

/* the x in the corner - desktop only */
#viewerCross{
    position: absolute;
    top: 1.5em;
    right: 1.5em;

    /* a square with even padding, so the cross sits dead centre */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3em;
    height: 3em;
    padding: 0.7em;
    border-radius: 50%;

    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 5px black;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* the cross is dark, so it is flipped white to sit on the dark button
   and flipped back when the button turns white on hover */
#viewerCross img{
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    filter: invert(1);
    transition: all 0.2s ease-in-out;
}

#viewerCross:hover{
    background-color: white;
    box-shadow: 0 0 10px white;
    transition: all 0.2s ease-in-out;
}

#viewerCross:hover img{
    filter: invert(0);
}

/* the button under the picture - phones only */
#viewerClose{
    display: none;
    flex-shrink: 0;

    padding: 0.75em 2em;
    border-radius: 20px;

    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 5px black;
    cursor: pointer;
}

/* every picture that can be opened gets a pointer over it */
main img, section img, article img, dialog img{
    cursor: zoom-in;
}

nav img, footer img, a img, button img{
    cursor: auto;
}

/* stops the page behind scrolling, sideways as well as up and down,
   while the picture is open */
html.viewerOpen, body.viewerOpen{
    overflow: hidden;
}


@media screen and (max-width: 767px) {
    /* dvh keeps the browser bar from pushing the button off the bottom */
    #imageViewer{
        height: 100dvh;
    }

    .viewerInner{
        gap: 0.75em;
        padding: 0.75em;
    }

    #viewerImage{
        border-radius: 10px;
    }

    /* a bit less zoom on a small screen, so it stays easy to drag around */
    #viewerImage.zoomed{
        width: 175%;
    }

    /* on a phone the x is swapped for a button under the picture */
    #viewerCross{
        display: none;
    }

    #viewerClose{
        display: block;
        width: 100%;
        max-width: 20em;
        text-align: center;
    }
}

/* -------------- portfolio popup -------------- */
/* the box that opens when the portfolio link in the nav bar is clicked */
/* it is built by javascript/general.js */
#portfolioPopup{
    margin: auto;
    width: min(30em, calc(100vw - 2em));
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    background-color: rgb(45, 45, 45);
    box-shadow: 0 0 30px black;
    animation: popupFade 0.2s ease-in-out;
}

#portfolioPopup::backdrop{
    background-color: rgba(0, 0, 0, 0.6);
}

@keyframes popupFade{
    from{
        opacity: 0;
        transform: scale(0.97);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}

.popupInner{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5em;
    padding: 2em;
}

/* the heading and text are stripped back - the box is already a panel */
#portfolioPopup h3{
    font-family: "Bebas Neue", sans-serif !important;
    font-size: 2.5em;
    letter-spacing: 0.05em;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0);
    border-radius: 0;
}

#portfolioPopup p{
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1em;
}

.popupButtons{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

/* the a tag needs the padding a button gets for free */
#popupContinue,
#popupCancel{
    padding: 1em 2em;
    border-radius: 20px;
    cursor: pointer;
}

#popupContinue:hover,
#popupCancel:hover{
    border-radius: 50px;
}
